<template>
  <div>
    <div class="list-table">
      <el-button class="create_btn" :icon="Plus" type="primary">新增</el-button>
      <el-table :data="fgdProjects">
        <el-table-column fixed prop="id" label="序号" width="60" />
        <el-table-column fixed prop="projectName" label="项目名称" width="120" />
        <el-table-column prop="lightWaveLength" label="光源波长" width="100" />
      </el-table>
    </div>
  </div>
</template>

<script setup>
import { Plus } from "@element-plus/icons-vue";
import { getFGDProjects } from "~/api/index.js";
import { ref } from "vue";

// 项目列表信息
const fgdProjects = ref([]);

getFGDProjects()
  .then((res) => {
    fgdProjects.value = res.data;
    console.log(fgdProjects.value);
  })
  .catch((err) => {
    console.log(res);
  });
</script>

<style scoped>
.list-table {
  width: 300px;
  height: 460px;
  margin-bottom: 32px;
  overflow: auto;
  @apply text-justify
}
</style>
